package com.lemon.smartsafety.ui.activity.fire;

import android.content.Context;
import android.os.Bundle;

import com.lemon.smartsafety.app.BundleKey;
import com.lemon.smartsafety.entity.event.common.PanelEvent;
import com.lemon.smartsafety.entity.safe.company.CompanyInfo;
import com.lemon.smartsafety.ui.activity.fire.item.FirefightingClassifyStatisticsActivity;
import com.lemon.smartsafety.ui.activity.fire.item.FirefightingCompanySetActivity;
import com.lemon.smartsafety.ui.activity.fire.item.FirefightingManageActivity;
import com.lemon.smartsafety.ui.activity.fire.item.FirefightingOverallActivity;
import com.lemon.smartsafety.ui.adapter.safe.data.ItemTag;
import com.lemon.smartsafety.utils.app.HUDUtil;
import com.lemon.smartsafety.utils.app.ToastUtils;
import com.lemon.smartsafety.utils.app.UIHelper;

/**
 * 项目名称：workspace
 * 类描述：
 * 创建人：Fargo
 * 创建时间：2016/8/4 14:51
 * 修改人：Fargo
 * 修改时间：2016/8/4 14:51
 * 修改备注：
 */
public class FirefightingEventHandler {

    public static void firefightingEventHandle(PanelEvent<ItemTag> event, Context context, CompanyInfo mCompanyInfo, HUDUtil mHUDUtil) {
        if (ItemTag.TAG_FIRE_MANAGE == event.getDataI().getTagI()) {//监督管理
            Bundle bundle = new Bundle();
            bundle.putSerializable(BundleKey.COMPANY_INFO, mCompanyInfo);
            UIHelper.showActivity(context, bundle, FirefightingManageActivity.class);
        } else if (ItemTag.CONTACT_UNIT_SET == event.getDataI().getTagI()) {//联络单位设置
            Bundle bundle = new Bundle();
            bundle.putSerializable(BundleKey.COMPANY_INFO, mCompanyInfo);
            UIHelper.showActivity(context, bundle, FirefightingCompanySetActivity.class);
        } else if (ItemTag.TURN_SUPERVISE == event.getDataI().getTagI()) {//移交督办
            ToastUtils.toastMsg("敬请期待...");
        } else if (ItemTag.SYNTHESIS == event.getDataI().getTagI()) {//综合情况
            Bundle bundle = new Bundle();
            bundle.putSerializable(BundleKey.COMPANY_INFO, mCompanyInfo);
            UIHelper.showActivity(context, bundle, FirefightingOverallActivity.class);
        } else if (ItemTag.INDUSTRY_STATISTICS == event.getDataI().getTagI()) {//行业分类统计
            Bundle bundle = new Bundle();
            bundle.putSerializable(BundleKey.COMPANY_INFO, mCompanyInfo);
            UIHelper.showActivity(context, bundle, FirefightingClassifyStatisticsActivity.class);
        } else if (ItemTag.ILLEGAL_STATISTICS == event.getDataI().getTagI()) {//常见违法行为统计
            ToastUtils.toastMsg("敬请期待...");
        }
    }


}
